package com.trade.module.base.service.impl;

import com.trade.module.base.entity.ResourceRole;
import com.trade.module.base.repository.ResourceRoleRepository;
import com.trade.module.base.service.ResourceRoleService;
import lombok.extern.log4j.Log4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.transaction.Transactional;

/**
 * Class Description:
 *
 * @Version v1.0 2017/4/23 14:47
 * @JDK version 1.8.0_51
 * @Author zfb
 */
@Log4j
@Service
@Transactional
public class ResourceRoleServiceImpl implements ResourceRoleService {

    @Autowired
    private ResourceRoleRepository resourceRoleRepository;

    /**
     * 新增
     *
     * @param resourceRole 资源
     * @return ResourceRole
     */
    @Override
    public ResourceRole save(ResourceRole resourceRole) {
        if (resourceRole == null) {
            return null;
        }
        return resourceRoleRepository.save(resourceRole);
    }
}
